import request from "@/utils/request";

// 查询列表
export function listHouse(query) {
  return request({
    url: "unit/houses",
    method: "get",
    params: query,
  });
}

//查询单元
export function getHouse(id){
  return request({
    url: "unit/houses/"+id,
    method:'get'
  })
}

//删除
export function deleteHouse(id){
  return request({
    url: "unit/houses/"+id,
    method:'delete'
  })
}
// 新增
export function addHouse(data){
  return request({
    url: "unit/houses",
    method: 'post',
    data: data
  })
}

// 更新
export function updateHouse(data){
  return request({
    url: "unit/houses",
    method: 'put',
    data: data
  })
}

